<?php
/**
 * Created by PhpStorm.
 * User: xmy2
 * Date: 18-8-9
 * Time: 下午11:09
 */
namespace vola\exception;

use Throwable;

class ErrorException extends \Exception
{
    public $type;

    public function __construct($message = "", $code = 0, $file = '', $line = 0, Throwable $previous = null)
    {
        if (empty($file)) {
            $debug = debug_backtrace()[0];
            $file = $debug['file'];
            $line = $debug['line'];
        }

        $this->file = $file;
        $this->line = $line;

        parent::__construct($message, $code, $previous);
    }

}